<?php
namespace app\app\controller\v1;
use think\Db;
class AdvertController extends  BaseController{

    /**
     * @return array
     * 首页轮播
     */
    public function HomePage()
    {
        $data = Db::name('advert')->where(['type_id'=>2,'status'=>1])->select();
        return json_code(200,'success',$data);
    }

    /**
     * @return array
     * 首页广告位
     */
    public function HomeAdv()
    {
        $data = Db::name('advert')->where(['type_id'=>3,'status'=>1])->order('advert_id desc')->select();
        return json_code(200,'success',$data);
    }
}